<?php
class SessionHelper
{
    static private $session = null;
    
    private function __construct()
    {
      session_start();
    }
    
    static public function getInstance()
    {
      if(self::$session === null){
        self::$session = new SessionHelper();
      }
      return self::$session;
    }
    
    public function getParam($param)
    {
      return (isset($_SESSION[$param]) ? $_SESSION[$param]: false);
    }
    public function setParam($name, $value)
    {
      $_SESSION[$name] = $value;
    }
    public function removeParam($param)
    {
      unset($_SESSION[$param]);
    }
    static public function destroy()
    {
      session_destroy();
      self::$session = null;
    }
}
?>